<%--
  Created by IntelliJ IDEA.
  User: 28732
  Date: 2024/12/19
  Time: 20:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>作者列表</title>
    <!-- 引入自定义 CSS -->
    <link href="<%= request.getContextPath() %>/resources/custom.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <h1 class="title">作者列表</h1>
    <div class="form-container">
        <form action="AuthorServlet" method="get">
            <input type="text" name="authorName" placeholder="请输入作者姓名" class="input-field">
            <button type="submit" class="search-button">查询</button>
        </form>
    </div>
    <div class="table-container">
        <table class="table">
            <thead>
            <tr>
                <th>编号</th>
                <th>姓名</th>
                <th>国籍</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${authorsList}" var="author">
                <tr>
                    <td>${author.author_id}</td>
                    <td>${author.author_name}</td>
                    <td>${author.author_nation}</td>
                    <td><a href="authorServlet?action=detail&authorId=${author.author_id}" class="delete-link">详情</a></td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
</div>
</body>
</html>

